Computers have executable program modules stored in memory that may be executed by a processor of the computer. To properly execute the module, the processor must be able to properly locate information stored within the module when the module itself is stored in the memory of the computer system. The module provides pointer values that may be accessed by the processor to then find locations of information within the module being executed.
The computer system accesses memory according to a particular memory addressing mode. Various memory addressing modes may be used. For example, for multiple processor systems, one processor has its own address space while another processor has a different set of address space such that the address of a memory location is processor specific. Thus, the particular memory addressing mode depends upon the particular processor that owns the memory location.
Other examples of memory addressing schemes include a virtual mode of memory addressing and a physical mode of memory addressing. The physical mode of memory addressing utilizes the physical address of memory of the computer system without any remapping of the physical address space. The virtual mode of memory addressing applies a remapping scheme of the physical address space. This remapping scheme for virtual mode addressing allows for various desirable characteristics, such as to allow a virtual memory address to remain the same while the underlying physical addresses being used may change over time and/or to cause multiple memory devices to appear as a single address space or to cause a single memory device to appear as multiple address spaces.
However, because there is a remapping scheme being applied, the virtual memory mode pointer value for a location of particular data is different than the actual underlying physical pointer value where the data is stored. Thus, when the processor accesses memory in the virtual memory addressing mode, the actual location that is accessed is based on the remapping scheme. When the processor accesses memory in the physical mode, there is no remapping scheme involved.
Regardless of the particular example of where multiple memory addressing modes are in use, the memory location pointers of a module that a processor references to access information must be representative of the proper memory addressing mode or the processor will attempt to access a non-existent memory location.
As an example of having incorrect pointer values in the module, if the processor is currently in a first memory addressing mode but the pointer values of the module are representative of a second memory addressing mode, then the processor will read the second memory addressing mode pointer values of the module and apply them to the address space of the first memory addressing mode without a remapping scheme being applied. These second memory addressing mode pointers will direct the processor to an invalid location in memory and will result in a system failure.
The processor may be switched between a first mode of memory addressing and a second mode memory of addressing for various reasons. For example, when the operating system is controlling the memory accesses, the processor will likely be using virtual mode addressing discussed above. However, the hardware system may require a switch to the physical addressing mode, also discussed above. For instance, various hardware errors may require that the processor switch to the physical mode of addressing. However, the module in memory has pointer values representative of the virtual mode address space such that this module cannot be successfully executed once the switch to the physical mode of addressing has occurred.